package cn.bx.bid.repository;

import cn.bx.bid.entity.Professor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ProfessorRepository extends JpaRepository<Professor,Long>, JpaSpecificationExecutor<Professor> {

    //记录专家未到次数
@Modifying
@Query(" update Professor set lostNum=?2 where id=?1")
    public  int increaseNotPresentNum(long id,Integer lostNum);

public Professor findAllByIdNotAndProjectCategory(long id,String projectCategory);
}
